package com.vmj.natives.java.lang;

import com.vmj.natives.NativeMethod;
import com.vmj.natives.Registry;
import com.vmj.rtda.Frame;

/**
 * Created by yangshoujun on 2017/9/16 下午5:36.
 */
public class Float {

    public static final java.lang.String jlClass = "java/lang/Float";

    public static void init() {

        Registry.register(jlClass, "floatToRawIntBits", "(F)I", new NativeMethod() {
            public void execute(Frame frame) {
                float val = frame.getLocalVars().getFloat(0);
                int v = java.lang.Float.floatToRawIntBits(val);
                frame.getOperandStack().pushInt(v);
            }
        });
    }
}
